app.service('z-salaryRequest-s', [
    '$rootScope',
    '$z-http',
    'ZModel',
    function ($rootScope, $http, ZModel) {
        var service = {
            getSalaryRequestList: function (data, success, fault) {
                $http.post("salaryRequest/getSalaryRequestList.do", data)
                    .success(function (data) {
                        success(data.success);
                    }).error(function (data) {
                    fault(data);
                });
            },
            saveSalaryRequestList: function (data, success, fault) {
                $http.post("salaryRequest/saveSalaryRequestList.do", data)
                    .success(function (data) {
                        success(data.success);
                    }).error(function (data) {
                    fault(data);
                });
            },
            deleteSalaryRequest: function (data, success, fault) {
                $http.post("salaryRequest/deleteSalaryRequest.do",
                    $.param(data),
                    {headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}})
                    .success(function (data) {
                        success(data.success);
                    }).error(function (data) {
                    fault(data);
                });
            },
            getBackSalaryRequest: function (data, success, fault) {
                $http.post("salaryRequest/getBackSalaryRequest.do",
                    $.param(data),
                    {headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}})
                    .success(function (data) {
                        success(data.success);
                    }).error(function (data) {
                    fault(data);
                });
            },
            saveSalaryRequestAgain: function (data, success, fault) {
                $http.post("salaryRequest/saveSalaryRequestAgain.do",
                    $.param(data),
                    {headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'}})
                    .success(function (data) {
                        success(data.success);
                    }).error(function (data) {
                    fault(data);
                });
            },
            getSalayApprovalRecordList: function (data, success, fault) {
                $http.post("salaryApproval/getSalaryApprovalRecordList.do",data)
                    .success(function (data) {
                        success(data.success);
                    }).error(function (data) {
                    fault(data);
                });
            },
            getYearMonth: function (data, success, fault) {
                $http.post("salaryRequest/getYearMonth.do", data)
                    .success(function (data) {
                        success(data.success);
                    }).error(function (data) {
                    fault(data);
                });
            },
            getDownloadSalary: function (data, success, fault) {
                $http.post("salary/getDownloadSalary.do", data)
                    .success(function (data) {
                        success(data.success);
                    }).error(function (data) {
                    fault(data);
                });
            },
        };
        return service;
    }]);